<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" name="viewport">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta content="telephone=no" name="format-detection">
    <title>投票</title>
    <link rel="stylesheet" type="text/css"  href="__CSS__/StyleSheet.css">
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__CSS__/base.css"/>
    
    <link rel="stylesheet" type="text/css" href="__CSS__/style.css"/>
    
    <script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src="__JS__/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="__JS__/jaliswall.js" type="text/javascript"></script>
</head>
<body>
<div class=" wrap">
    <div class="banner"><img src="__IMG__/banner_01.jpg" style="-webkit-appearance: none;"></div>
    <div class="bm_bg">
        <form action="__SELF__" method="get">
            
            <div class="input-group search">
                <input class="form-control" type="text" tabindex="3" placeholder="请输入姓名或编号" name="search" style="color:#999;">
                <span class="input-group-btn">
                    <button class="btn btn-default btn-icon" type="submit">
                        <i class="fa fa-search fa-lg" style="color:#e9e9e9"></i>
                    </button>
                    </span>
            </div>
        </form>
        <div class="tp_sz">
            <ul>
                <li>已报名<p>{$total}</p></li>
                <li>投票人次<p>123</p></li>
                <li style="border:0; width:32%">访问量<p>123</p></li>
            </ul>
        </div>
    </div>
    <!-- 	<button class="apply"><a href="#">我要报名</a></button> -->
    <div class="rank">
        <ul>
            <li><a href="{:U('Index/index?sort=0&vote='.I('get.vote',''))}" <if condition="I('param.sort') neq 'desc'">class="active"</if> >最新参赛</a></li>
            <li><a href="{:U('Index/index?sort=desc&vote='.I('get.vote',''))}" <if condition="I('param.sort') eq 'desc'">class="active"</if> >投票排行</a></li>
            <li><a href="{:U('Index/index?sort=desc&limit=200&vote='.I('get.vote',''))}" <if condition="I('param.sort') eq 'desc'">class="active"</if> >TOP200</a></li>
        </ul>
    </div>
    <div class="wrapper">
        <ul class="wall">
            
            <volist name="itemList" id="item">
                <li class="article">
                    <a href="{:U('Item/detail/?id='.$item['id'])}">
                        <div  class="bm">第{$item['id']}号</div>
                        <img src="/Public/Home/img/4.jpg" />
                        <p>{$item['title']}</p>
                        <small>{$item['poll']}票</small>
                    </a>
                    <input type="button" value="投票" onclick="vote({$item['id']})"/>
                
                </li>
            </volist>
        </ul>
    </div>
    
    <div class="paging">
        {$page}
    </div>
    <div class="footer_b"><a href="#">技术支持：汇友科技</a></div>
    <div class="footer">
        <ul>
            <li><a href="index.html" id="active">
                <i class="fa fa-home fa-lg"></i>
                <p>首页</p>
            </a>
            </li>
            <li><a href="paiming.html">
                <i class="fa fa-user-plus fa-lg"></i>
                <p>排名</p>
            </a>
            </li>
            <li><a href="shuoming.html">
                <i class="fa fa-paper-plane fa-lg"></i>
                <p>说明</p>
            </a>
            </li>
            <li><a href="#">
                <i class="fa fa-trophy fa-lg"></i>
                <p>奖品</p>
            </a>
            </li>
        </ul>
    
    </div>
</div>
<script>
    $(document).ready(function(){
        console.log('%ccode = ',"color:brown;font-size:16px;");
        console.log('%c{$code}',"padding-left:20px;");
        console.log('%cconfig["wechat"]["title"] = ',"color:brown;font-size:16px;");
        console.log('{$config["wechat"]["title"]}');
        console.log('%cwechat_auth["openid"] = ',"color:brown;font-size:16px;");
        console.log('%c{:array_dump($wechat_auth)}',"padding-left:20px;");
        console.log('%cuser_info["nickname"] = ',"color:brown;font-size:16px;");
        console.log('%c{$user_info["nickname"]}',"padding-left:20px;");
    });
</script>
<script type="text/javascript">
    $(function(){
        $('.wall').jaliswall({ item: '.article' });

    });

    function vote(item_id){
        var vote_id = {$vote['id']};
        $.post(
            '/index.php?s=Vote/add',
            {id:item_id},
            function(data){
                if(1 == data.code){
                    console.log("%c"+data.msg,"color:green;font-size:18px;");
                }else{
                    console.log("%c"+data.msg,"color:red;font-size:18px;");
                }

            }
        );
    }
</script>
</body>
</html>